name: Attu docker build test

on:
  pull_request:
    branches:
      - main
    types: [opened, synchronize]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Docker Build
        uses: docker/build-push-action@v5
        with:
          context: .
          platforms: linux/amd64
          tags: zilliz/attu:dev
          build-args: VERSION=dev
          push: false
